#pragma once
#ifndef SMPPREPLACESM_HPP
#define SMPPREPLACESM_HPP

#include "SMPPHeader.hpp"
#include "SMPPMessageReplacementTLVs.hpp"

namespace smpp {
namespace pdu{

class SMPP_DLLPRFX ReplaceSM : public Header,
public MessageReplacementTLVs{
	CoctetString _MessageId;
	quint8 _SourceAddrTON;
	quint8 _SourceAddrNPI;
	CoctetString _SourceAddr;
	CoctetString _ScheduleDeliveryTime;
	CoctetString _ValidityPeriod;
	quint8 _RegisteredDelivery;
	quint8 _SMDefaultMsgId;
	quint8 _SMLength;
	octetString _ShortMessage;
public:
	ReplaceSM(const Header &nHeader = Header(),
		const CoctetString &nMessageId = "",
		const quint8 nSourceAddrTON = 0,
		const quint8 nSourceAddrNPI = 0,
		const CoctetString &nSourceAddr = "",
		const CoctetString &nScheduleDeliveryTime = "",
		const CoctetString &nValidityPeriod = "",
		const quint8 nRegisteredDelivery = 0,
		const quint8 nSMDefaultMsgId = 0,
		const quint8 nSMLength = 0,
		const octetString &nShortMessage = octetString(),
		const MessageReplacementTLVs &
		nMessageReplacementTLVs = MessageReplacementTLVs());

	ReplaceSM(const ReplaceSM &);

	void setMessageId(const CoctetString &);

	const CoctetString &getMessageId() const;

	void setSourceAddrTON(const quint8);

	const quint8 getSourceAddrTON() const;

	void setSourceAddrNPI(const quint8);

	const quint8 getSourceAddrNPI() const;

	void setSourceAddr(const CoctetString &);
		 
	const CoctetString &getSourceAddr() const;

	void setScheduleDeliveryTime(const CoctetString &);

	const CoctetString &getScheduleDeliveryTime() const;

	void setValidityPeriod(const CoctetString &);

	const CoctetString &getValidityPeriod() const;

	void setRegisteredDelivery(const quint8);

	const quint8 getRegisteredDelivery() const;

	void setSMDefaultMsgId(const quint8);

	const quint8 getSMDefaultMsgId() const;

	void setSMLength(const quint8);

	const quint8 getSMLength() const;

	void setShortMessage(const octetString &);

	const octetString &getShortMessage() const;

	void calcCommandLength();
};

}
}

#endif
